package vista;
import java.awt.BorderLayout;
import javax.swing.JButton;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

import controlador.ContSelecIngre;
import controlador.ContSelecProducto;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class DlgSelecIngre extends javax.swing.JDialog {
	private JPanel PnlIngredientes;
	private JScrollPane jScrollPane1;
	private JButton btSalir;
	private JButton btAceptar;
	private JLabel lblIngrediente;
	private JTable tblIngredientes;

	private ContSelecIngre controlador;

	public DlgSelecIngre(JFrame frame, ContSelecIngre controlador) {
		super(frame);
		this.controlador = controlador;
		initGUI();
	}
	
	private void initGUI() {
		try {
			{
				this.setTitle("Ingredientes");
			}
			{
				PnlIngredientes = new JPanel();
				getContentPane().add(PnlIngredientes, BorderLayout.CENTER);
				PnlIngredientes.setLayout(null);
				PnlIngredientes.setPreferredSize(new java.awt.Dimension(348, 254));
				{
					lblIngrediente = new JLabel();
					PnlIngredientes.add(lblIngrediente);
					lblIngrediente.setText("SELECCIONE UN INGREDIENTE");
					lblIngrediente.setBounds(76, 25, 228, 14);
				}
				{
					jScrollPane1 = new JScrollPane();
					PnlIngredientes.add(jScrollPane1);
					jScrollPane1.setBounds(64, 51, 256, 131);
					{
						TableModel tblIngredientesModel = 
							new DefaultTableModel(
									new String[][] { { "One", "Two" }, { "Three", "Four" } },
									new String[] { "Ingrediente"});
						tblIngredientes = new JTable();
						jScrollPane1.setViewportView(tblIngredientes);
						tblIngredientes.setModel(tblIngredientesModel);
						tblIngredientes.setBounds(72, 63, 243, 80);
					}
				}
				{
					btAceptar = new JButton();
					PnlIngredientes.add(btAceptar);
					btAceptar.setText("Aceptar");
					btAceptar.setBounds(132, 221, 96, 26);
				}
				{
					btSalir = new JButton();
					PnlIngredientes.add(btSalir);
					btSalir.setText("Salir");
					btSalir.setBounds(264, 221, 78, 26);
				}
			}
			this.setSize(386, 298);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public JTable getTblIngredientes() {
		return tblIngredientes;
	}

	public JButton getBtSalir() {
		return btSalir;
	}

	public JButton getBtAceptar() {
		return btAceptar;
	}
	
	public void mostrarMensaje(String mensaje) {
    	JOptionPane.showMessageDialog(this, mensaje);
    }
}
